install.packages("quanteda")
install.packages("newsmap")
install.packages("topicmodels")
install.packages("ldatuning")
install.packages("knitr")

# tokenize UNGA corpus
source("data.R", local = TRUE)

# describe data
rmarkdown::render("description.Rmd")

# show relationship between coverage, AFE, and F1
source("simulation.R", local = TRUE) # takes long time
rmarkdown::render("simulation.Rmd")

# fit seeded-LDA and unseeded-LDA
source("LDA.R", local = TRUE)
rmarkdown::render("LDA.Rmd")

# generate report for prediction accuracy
source("prediction.R", local = TRUE)
rmarkdown::render("prediction.Rmd")

# contextual smoothing
source("smoothing.R", local = TRUE)
rmarkdown::render("smoothing.Rmd")

# compare before and after 9/11 as an example
rmarkdown::render("example.Rmd")
